create or replace package pck_emp is

  -- Author  : ADMINISTRATOR
  -- Created : 2019\3\31 星期日 21:04:44
  -- Purpose : 
  
  /**
  * 删除员工
  * author:amado
  * date:2019-03-31
  */
  procedure proc_emp_delete(p_emp_no VARCHAR2);
  
  /**
  * 插入员工
  * author:amado
  * date:2019-03-31
  */
  procedure proc_emp_insert(p_empno VARCHAR2,
                                              p_ename VARCHAR2,
                                              p_dept_no NUMBER);

end pck_emp;



create or replace package body pck_emp is

  procedure proc_emp_delete(p_emp_no VARCHAR2) is
  begin
    DELETE FROM t_emp WHERE emp_no = p_emp_no;
    dbms_output.put_line('被删除的记录的empno=' || p_emp_no);
  end;

  procedure proc_emp_insert(p_empno   VARCHAR2,
                            p_ename   VARCHAR2,
                            p_dept_no NUMBER) is
  begin
    INSERT INTO T_EMP
      (ID, EMP_NO, EMP_NAME, DEPT_NO)
    VALUES
      (SEQ_EMP.NEXTVAL, p_empno, p_ename, p_dept_no);
    dbms_output.put_line('插入成功：' || p_empno);
  end proc_emp_insert;

end pck_emp;
